package com.lzw.breezeNovel.webApp.controller.video;

import com.lzw.breezeNovel.common.result.Result;
import com.lzw.breezeNovel.model.entity.pojo.video.TvEpisode;
import com.lzw.breezeNovel.webApp.service.video.TvEpisodeService;
import com.lzw.breezeNovel.webApp.vo.video.TvEpisodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.video
 * @date 2025/3/20
 * @description 电视剧的集数
 */
@RestController
@RequestMapping("/app/tvEpisode")
@SuppressWarnings("all")
public class TvEpisodeController {

    /**
     * 注入service
     */
    @Autowired
    private TvEpisodeService tvEpisodeService;

    /**
     * 根据id查询电视剧的集数
     */
    @RequestMapping("/getTvEpisodeById")
    public Result<List<TvEpisodeVo>> getTvEpisodeById(@RequestParam Integer id){
        //根据id查询电视剧的集数
        List<TvEpisodeVo> tvEpisodes = tvEpisodeService.getTvEpisodeById(id);
        return Result.ok(tvEpisodes);
    }

}
